library(ggplot2)
library(plotly)
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
R Markdown
athlete_events <- read.table ("C:/Users/Yash/Desktop/athlete_events.csv/athlete_events.csv" , sep= ",", header = TRUE)
attach (athlete_events)
p <- ggplot(athlete_events, aes(x=Height, y=Weight, frame = Year, color = Medal)) + geom_point()+labs(title = 'Competition Plot',x='Height',y='Weight')
p <- ggplotly(p)
p